#include <bits/stdc++.h>
using namespace std;

const int R = 1e5 + 10;
char g_s[R], g_t[R];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	int n, i;
	cin >> n;
	for (i = 1; i <= n; ++i)
	{
		cin >> g_s[i];
	}
	for (i = 1; i <= n; ++i)
	{
		cin >> g_t[i];
	}
	sort(g_s + 1, g_s + n + 1);
	sort(g_t + 1, g_t + n + 1);
	for (i = 1; i <= n; ++i)
	{
		if (g_s[i] != g_t[i])
		{
			cout << "No\n";
			return 0;
		}
	}
	cout << "Yes\n";
	return 0;
}
